package com.example.keyon;

import com.google.zxing.Result;

import java.util.List;

/**
 * 程序主入口
 */
public class App 
{
    final static String qrCodePath = "QRCODE.png";

    public static void main(String[] args) {
        PiCamera.takePicture(); // 调用树莓派摄像头,获取二维码图片
        List<Result> resultList = QRCodeTools.decodeMultiByPath(qrCodePath); // 解码
        if (resultList == null || resultList.size() == 0) {
            System.out.println("decode data is null");
            return;
        }
        for (Result res : resultList) {
            System.out.println("res: " + res.getText());
        }
    }
}
